package com.qj.yantaishan.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import com.qj.yantaishan.mapper.ProductQrcodeActivityMapper;
import com.qj.yantaishan.domain.ProductQrcodeActivity;
import com.qj.yantaishan.service.IProductQrcodeActivityService;
import com.qj.yantaishan.common.core.text.Convert;

/**
 * 商品扫码活动Service业务层处理
 * 
 * @author qihe
 * @date 2022-07-22
 */
@Service
@Primary
public class ProductQrcodeActivityServiceImpl    extends ServiceImpl<ProductQrcodeActivityMapper, ProductQrcodeActivity>  implements IProductQrcodeActivityService
{
    @Autowired
    private ProductQrcodeActivityMapper productQrcodeActivityMapper;

    /**
     * 查询商品扫码活动
     * 
     * @param pigcmsId 商品扫码活动主键
     * @return 商品扫码活动
     */
    @Override
    public ProductQrcodeActivity selectProductQrcodeActivityByPigcmsId(Long pigcmsId)
    {
        return productQrcodeActivityMapper.selectProductQrcodeActivityByPigcmsId(pigcmsId);
    }

    /**
     * 查询商品扫码活动列表
     * 
     * @param productQrcodeActivity 商品扫码活动
     * @return 商品扫码活动
     */
    @Override
    public List<ProductQrcodeActivity> selectProductQrcodeActivityList(ProductQrcodeActivity productQrcodeActivity)
    {
        return productQrcodeActivityMapper.selectProductQrcodeActivityList(productQrcodeActivity);
    }

    /**
     * 新增商品扫码活动
     * 
     * @param productQrcodeActivity 商品扫码活动
     * @return 结果
     */
    @Override
    public int insertProductQrcodeActivity(ProductQrcodeActivity productQrcodeActivity)
    {
        return productQrcodeActivityMapper.insertProductQrcodeActivity(productQrcodeActivity);
    }

    /**
     * 修改商品扫码活动
     * 
     * @param productQrcodeActivity 商品扫码活动
     * @return 结果
     */
    @Override
    public int updateProductQrcodeActivity(ProductQrcodeActivity productQrcodeActivity)
    {
        return productQrcodeActivityMapper.updateProductQrcodeActivity(productQrcodeActivity);
    }

    /**
     * 批量删除商品扫码活动
     * 
     * @param pigcmsIds 需要删除的商品扫码活动主键
     * @return 结果
     */
    @Override
    public int deleteProductQrcodeActivityByPigcmsIds(String pigcmsIds)
    {
        return productQrcodeActivityMapper.deleteProductQrcodeActivityByPigcmsIds(Convert.toStrArray(pigcmsIds));
    }

    /**
     * 删除商品扫码活动信息
     * 
     * @param pigcmsId 商品扫码活动主键
     * @return 结果
     */
    @Override
    public int deleteProductQrcodeActivityByPigcmsId(Long pigcmsId)
    {
        return productQrcodeActivityMapper.deleteProductQrcodeActivityByPigcmsId(pigcmsId);
    }
}
